package com.promis.party.ui.partywork.partyMag.develop;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;

import com.promis.compat.StatusBarCompat;
import com.promis.party.R;
import com.promis.party.helper.UIHepler;
import com.promis.party.ui.partywork.dailywork.assessment.AssessUserListAdapter;
import com.promis.widget.paging.OnPageRefreshListener;
import com.promis.widget.paging.OnPageScrollListener;
import com.promis.widget.paging.PageRefreshRecyclerView;
import com.promis.widget.recycler.RecyclerLayoutManagerHelper;

public class DevelopUserListActivity extends AppCompatActivity {

    private PageRefreshRecyclerView pageRefreshRecyclerView;
    private RecyclerView rylvContainer;
    private TextView txtvTitle;
    private DevelopUserListAdapter adaptPledge;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_page_recycler);
        StatusBarCompat.translucentStatusBar(this);
        StatusBarCompat.blackTextStatusBar(this);
        UIHepler.goBack(DevelopUserListActivity.this, R.id.layout_top_title_imgv_close);
        txtvTitle = findViewById(R.id.layout_top_title_txtv_title);

        pageRefreshRecyclerView = findViewById(R.id.activity_page_recycler_prrv_container);

        initData();
        initListener();
    }

    private void initData() {
        txtvTitle.setText("党员发展列表");
        rylvContainer = pageRefreshRecyclerView.getRecyclerView();
        RecyclerLayoutManagerHelper.buildVerticalLinearLayoutManager(getBaseContext(), rylvContainer);
        adaptPledge = new DevelopUserListAdapter(getBaseContext());
        rylvContainer.setAdapter(adaptPledge);
    }

    private void initListener() {
        pageRefreshRecyclerView.setOnPageScrollListener(new OnPageScrollListener() {
            @Override
            public void onLoadPageData() {
            }
        });
        pageRefreshRecyclerView.setOnRefreshListener(new OnPageRefreshListener() {
            @Override
            public void onRefresh() {
            }
        });
        adaptPledge.setOnItemClickListener(new DevelopUserListAdapter.OnItemClickListener() {
            @Override
            public void onClickComment(View view, int position) {

            }
        });
    }
}
